package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.NewsPage;
import cn.wolfcode.trip.base.query.NewsPageQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsPageMapper {
    int deleteByPrimaryKey(Long id);

    int insert(NewsPage record);

    NewsPage selectByPrimaryKey(Long id);

    List<NewsPage> selectAll(@Param("state") Integer state);

    int updateByPrimaryKey(NewsPage record);

    List<NewsPage> selectForList(NewsPageQueryObject qo);

    List<NewsPage> selectByCollectId(List<Integer> collectIds);

    int selectCollectNum(Long collectId);

    void updateCollectNum(@Param("collectId") Long collectId, @Param("collectNum") int collectNum);
}